
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@bleed-believer/meta
Advanced tools
Adds metadata easifuly to your objects.
Since ESM hs been heavely adopted by the whole node.js
community (including transpilers, unit testing, and many other libraries), the CJS support has been removed. If you still needs the CJS compatibility, please use this version or earlier.
Use npm to get the last version:
npm i --save @bleed-believer/meta
To understand how this library works, first we need to define some concepts:
Any object that you want to write inside of, data about itself. It's common, for example, have classes that you need to specify how these classes will be instantiated and used for a particular third party tool or library. So in thoses cases you may need to write data dinamically into the prototype por example.
The data do you want to attach to the target. This data normally describes how to use the target object to another one that requires for it. We use interfaces to describe the structure of a kind of metadata.
First create an interface with the structure of your metadata:
export interface EndpointMeta {
path: string;
routes: {
method: string;
key: string;
}[];
}
Create a new instance of MetaManager
:
export const ENDPOINT = new MetaManager<EndpointMeta>();
Now you can attach metadata into your objects:
import { ENDPOINT } from './endpoint.js';
export class UserController {
get(): Promise<void> {
// bla bla bla bla bla bla
}
set(): Promise<void> {
// bla bla bla bla bla bla
}
}
ENDPOINT.set(UserController, {
path: 'user',
routes: [
{ method: 'GET', key: 'get' },
{ method: 'POST', key: 'set' },
]
});
...or get its metadata:
import { UserController } from './user.controller.js';
import { ENDPOINT } from './endpoint.js';
const meta = ENDPOINT.get(UserController);
console.log(meta);
// Prints:
// {
// path: 'user',
// routes: [
// { method: 'GET', key: 'get' },
// { method: 'POST', key: 'set' },
// ]
// }
FAQs
Manage multiple tags into your objects.
The npm package @bleed-believer/meta receives a total of 30 weekly downloads. As such, @bleed-believer/meta popularity was classified as not popular.
We found that @bleed-believer/meta demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.